##### posix::basic_stream_descriptor::non_blocking (2 of 3 overloads)

Inherited from posix::basic_descriptor.

Sets the non-blocking mode of the descriptor.

    void non_blocking(
        bool mode);

###### Parameters

mode

  If `true`, the descriptor's synchronous operations will fail with `asio::error::would_block` if they are unable to perform the requested operation immediately. If `false`, synchronous operations will block until complete.

###### Exceptions

asio::system_error

  Thrown on failure.

###### Remarks

The non-blocking mode has no effect on the behaviour of asynchronous operations. Asynchronous operations will never fail with the error `asio::error::would_block`.